import { ref, onMounted, watch } from "vue";
import * as echarts from "echarts";
// Define a prop to receive data
const props = defineProps({
    chartData: {
        type: Object,
        required: true
    }
});
const mainRef = ref(null);
let myChart = null;
onMounted(() => {
    myChart = echarts.init(mainRef.value);
    myChart.setOption(props.chartData);
});
// Watch for changes in chartData and update the chart
watch(() => props.chartData, (newData) => {
    if (myChart) {
        myChart.setOption(newData);
    }
});
debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
const __VLS_ctx = {};
let __VLS_components;
let __VLS_directives;
// CSS variable injection 
// CSS variable injection end 
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
    ref: "mainRef",
    ...{ class: "w-[100%] h-[100%]" },
});
/** @type {typeof __VLS_ctx.mainRef} */ ;
/** @type {__VLS_StyleScopedClasses['w-[100%]']} */ ;
/** @type {__VLS_StyleScopedClasses['h-[100%]']} */ ;
var __VLS_dollars;
const __VLS_self = (await import('vue')).defineComponent({
    setup() {
        return {
            $props: __VLS_makeOptional(props),
            ...props,
            mainRef: mainRef,
        };
    },
});
export default (await import('vue')).defineComponent({
    setup() {
        return {
            $props: __VLS_makeOptional(props),
            ...props,
        };
    },
});
; /* PartiallyEnd: #4569/main.vue */
